/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: UserWarpper
 * Author:   zhouheng
 * Date:     2018/6/22 14:23
 * Description: 用户包装类
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.hengby.hengcrud.modular.sys.warpper;

import com.hengby.hengcrud.core.common.factory.ConstantFactory;
import com.hengby.hengcrud.modular.base.wrap.BaseControllerWarpper;
import org.apache.ibatis.reflection.wrapper.BaseWrapper;

import java.util.List;
import java.util.Map;

/**
 * 〈一句话功能简述〉<br> 
 * 〈用户包装类〉
 *
 * @author zhouheng
 * @create 2018/6/22
 * @since 1.0.0
 */
public class UserWarpper extends BaseControllerWarpper{

    public UserWarpper(List<Map<String ,Object>> list) {
        super(list);
    }

    @Override
    protected void warpTheMap(Map<String, Object> map) {
        map.put("sexName", ConstantFactory.me().getSexName((Integer) map.get("sex")));
        map.put("roleName", ConstantFactory.me().getRoleName((String) map.get("roleid")));
        map.put("deptName", ConstantFactory.me().getDeptName((Integer) map.get("deptid")));
        map.put("statusName", ConstantFactory.me().getStatusName((Integer) map.get("status")));

    }
}